using System;
using System.ComponentModel;
using System.Drawing;
using System.Reflection;
using System.Windows.Forms;

namespace PcrExperimentProject
{
	public class FormGreyZoneConclusion : Form
	{
		private IContainer components;

		protected Panel panelButtons;

		protected Label label1;

		protected Button btnCancel;

		protected Button btnConfirm;

		private Label lblGrayZoneConclusion;

		private TextBox txtGrayZoneConclusion;

		private TextBox txtPositiveConclusion;

		private Label lblPositiveConclusion;

		private TextBox txtNegativeConclusion;

		private Label lblNegativeConlusion;

		private ComboBox cmbNegativeColor;

		private ComboBox cmbPositiveColor;

		private ComboBox cmbGrayZoneColor;

		public Color GetGrayZoneColor()
		{
			return Color.FromName(cmbGrayZoneColor.SelectedItem.ToString());
		}

		public Color GetPositiveColor()
		{
			return Color.FromName(cmbPositiveColor.SelectedItem.ToString());
		}

		public Color GetNegativeColor()
		{
			return Color.FromName(cmbNegativeColor.SelectedItem.ToString());
		}

		public string GetGrayZoneConclusion()
		{
			return txtGrayZoneConclusion.Text.Trim();
		}

		public string GetPositiveConclusion()
		{
			return txtPositiveConclusion.Text.Trim();
		}

		public string GetNegativeConclusion()
		{
			return txtNegativeConclusion.Text.Trim();
		}

		public FormGreyZoneConclusion(string title, string[] conclusion, Color[] color)
		{
			InitializeComponent();
			Text = title;
			txtNegativeConclusion.Text = conclusion[0];
			txtPositiveConclusion.Text = conclusion[1];
			txtGrayZoneConclusion.Text = conclusion[2];
			base.DialogResult = DialogResult.Cancel;
			InitializeColorComboBox(cmbNegativeColor);
			InitializeColorComboBox(cmbPositiveColor);
			InitializeColorComboBox(cmbGrayZoneColor);
			cmbNegativeColor.SelectedItem = color[0].Name;
			cmbPositiveColor.SelectedItem = color[1].Name;
			cmbGrayZoneColor.SelectedItem = color[2].Name;
		}

		private void btnConfirm_Click(object sender, EventArgs e)
		{
			base.DialogResult = DialogResult.OK;
			Close();
		}

		private void btnCancel_Click(object sender, EventArgs e)
		{
			Close();
		}

		private void InitializeColorComboBox(ComboBox comboBox)
		{
			comboBox.DrawMode = DrawMode.OwnerDrawFixed;
			comboBox.DropDownStyle = ComboBoxStyle.DropDownList;
			comboBox.DrawItem += comboColor_DrawItem;
			comboBox.ItemHeight = 18;
			comboBox.BeginUpdate();
			comboBox.Items.Clear();
			PropertyInfo[] properties = typeof(Color).GetProperties(BindingFlags.Static | BindingFlags.Public);
			foreach (PropertyInfo propertyInfo in properties)
			{
				comboBox.Items.Add(propertyInfo.Name);
			}
			comboBox.EndUpdate();
		}

		private void FormGreyZoneConclusion_Load(object sender, EventArgs e)
		{
		}

		private void comboColor_DrawItem(object sender, DrawItemEventArgs e)
		{
			ComboBox comboBox2 = (ComboBox)sender;
			if (e.Index >= 0)
			{
				e.DrawBackground();
				Rectangle rect = new Rectangle(4, e.Bounds.Top + 2, e.Bounds.Width - 6, e.Bounds.Height - 4);
				ComboBox comboBox = (ComboBox)sender;
				string name = comboBox.Items[e.Index].ToString();
				SolidBrush brush = new SolidBrush(Color.FromName(name));
				e.Graphics.FillRectangle(brush, rect);
				e.Graphics.DrawRectangle(Pens.Black, rect);
			}
		}

		private void cmbNegativeColor_SelectedIndexChanged(object sender, EventArgs e)
		{
			txtNegativeConclusion.ForeColor = Color.FromName(cmbNegativeColor.SelectedItem.ToString());
		}

		private void cmbPositiveColor_SelectedIndexChanged(object sender, EventArgs e)
		{
			txtPositiveConclusion.ForeColor = Color.FromName(cmbPositiveColor.SelectedItem.ToString());
		}

		private void cmbGrayZoneColor_SelectedIndexChanged(object sender, EventArgs e)
		{
			txtGrayZoneConclusion.ForeColor = Color.FromName(cmbGrayZoneColor.SelectedItem.ToString());
		}

		protected override void Dispose(bool disposing)
		{
			if (disposing && components != null)
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}

		private void InitializeComponent()
		{
			System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(PcrExperimentProject.FormGreyZoneConclusion));
			this.panelButtons = new System.Windows.Forms.Panel();
			this.label1 = new System.Windows.Forms.Label();
			this.btnCancel = new System.Windows.Forms.Button();
			this.btnConfirm = new System.Windows.Forms.Button();
			this.lblGrayZoneConclusion = new System.Windows.Forms.Label();
			this.txtGrayZoneConclusion = new System.Windows.Forms.TextBox();
			this.txtPositiveConclusion = new System.Windows.Forms.TextBox();
			this.lblPositiveConclusion = new System.Windows.Forms.Label();
			this.txtNegativeConclusion = new System.Windows.Forms.TextBox();
			this.lblNegativeConlusion = new System.Windows.Forms.Label();
			this.cmbNegativeColor = new System.Windows.Forms.ComboBox();
			this.cmbPositiveColor = new System.Windows.Forms.ComboBox();
			this.cmbGrayZoneColor = new System.Windows.Forms.ComboBox();
			this.panelButtons.SuspendLayout();
			base.SuspendLayout();
			this.panelButtons.AccessibleDescription = null;
			this.panelButtons.AccessibleName = null;
			resources.ApplyResources(this.panelButtons, "panelButtons");
			this.panelButtons.BackgroundImage = null;
			this.panelButtons.Controls.Add(this.label1);
			this.panelButtons.Controls.Add(this.btnCancel);
			this.panelButtons.Controls.Add(this.btnConfirm);
			this.panelButtons.Font = null;
			this.panelButtons.ForeColor = System.Drawing.SystemColors.ControlText;
			this.panelButtons.Name = "panelButtons";
			this.label1.AccessibleDescription = null;
			this.label1.AccessibleName = null;
			resources.ApplyResources(this.label1, "label1");
			this.label1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
			this.label1.Font = null;
			this.label1.Name = "label1";
			this.btnCancel.AccessibleDescription = null;
			this.btnCancel.AccessibleName = null;
			resources.ApplyResources(this.btnCancel, "btnCancel");
			this.btnCancel.BackgroundImage = null;
			this.btnCancel.Font = null;
			this.btnCancel.Name = "btnCancel";
			this.btnCancel.UseVisualStyleBackColor = true;
			this.btnCancel.Click += new System.EventHandler(btnCancel_Click);
			this.btnConfirm.AccessibleDescription = null;
			this.btnConfirm.AccessibleName = null;
			resources.ApplyResources(this.btnConfirm, "btnConfirm");
			this.btnConfirm.BackgroundImage = null;
			this.btnConfirm.Font = null;
			this.btnConfirm.Name = "btnConfirm";
			this.btnConfirm.UseVisualStyleBackColor = true;
			this.btnConfirm.Click += new System.EventHandler(btnConfirm_Click);
			this.lblGrayZoneConclusion.AccessibleDescription = null;
			this.lblGrayZoneConclusion.AccessibleName = null;
			resources.ApplyResources(this.lblGrayZoneConclusion, "lblGrayZoneConclusion");
			this.lblGrayZoneConclusion.Font = null;
			this.lblGrayZoneConclusion.Name = "lblGrayZoneConclusion";
			this.txtGrayZoneConclusion.AccessibleDescription = null;
			this.txtGrayZoneConclusion.AccessibleName = null;
			resources.ApplyResources(this.txtGrayZoneConclusion, "txtGrayZoneConclusion");
			this.txtGrayZoneConclusion.BackgroundImage = null;
			this.txtGrayZoneConclusion.Font = null;
			this.txtGrayZoneConclusion.Name = "txtGrayZoneConclusion";
			this.txtPositiveConclusion.AccessibleDescription = null;
			this.txtPositiveConclusion.AccessibleName = null;
			resources.ApplyResources(this.txtPositiveConclusion, "txtPositiveConclusion");
			this.txtPositiveConclusion.BackgroundImage = null;
			this.txtPositiveConclusion.Font = null;
			this.txtPositiveConclusion.Name = "txtPositiveConclusion";
			this.lblPositiveConclusion.AccessibleDescription = null;
			this.lblPositiveConclusion.AccessibleName = null;
			resources.ApplyResources(this.lblPositiveConclusion, "lblPositiveConclusion");
			this.lblPositiveConclusion.Font = null;
			this.lblPositiveConclusion.Name = "lblPositiveConclusion";
			this.txtNegativeConclusion.AccessibleDescription = null;
			this.txtNegativeConclusion.AccessibleName = null;
			resources.ApplyResources(this.txtNegativeConclusion, "txtNegativeConclusion");
			this.txtNegativeConclusion.BackgroundImage = null;
			this.txtNegativeConclusion.Font = null;
			this.txtNegativeConclusion.Name = "txtNegativeConclusion";
			this.lblNegativeConlusion.AccessibleDescription = null;
			this.lblNegativeConlusion.AccessibleName = null;
			resources.ApplyResources(this.lblNegativeConlusion, "lblNegativeConlusion");
			this.lblNegativeConlusion.Font = null;
			this.lblNegativeConlusion.Name = "lblNegativeConlusion";
			this.cmbNegativeColor.AccessibleDescription = null;
			this.cmbNegativeColor.AccessibleName = null;
			resources.ApplyResources(this.cmbNegativeColor, "cmbNegativeColor");
			this.cmbNegativeColor.BackgroundImage = null;
			this.cmbNegativeColor.Font = null;
			this.cmbNegativeColor.FormattingEnabled = true;
			this.cmbNegativeColor.Name = "cmbNegativeColor";
			this.cmbNegativeColor.SelectedIndexChanged += new System.EventHandler(cmbNegativeColor_SelectedIndexChanged);
			this.cmbPositiveColor.AccessibleDescription = null;
			this.cmbPositiveColor.AccessibleName = null;
			resources.ApplyResources(this.cmbPositiveColor, "cmbPositiveColor");
			this.cmbPositiveColor.BackgroundImage = null;
			this.cmbPositiveColor.Font = null;
			this.cmbPositiveColor.FormattingEnabled = true;
			this.cmbPositiveColor.Name = "cmbPositiveColor";
			this.cmbPositiveColor.SelectedIndexChanged += new System.EventHandler(cmbPositiveColor_SelectedIndexChanged);
			this.cmbGrayZoneColor.AccessibleDescription = null;
			this.cmbGrayZoneColor.AccessibleName = null;
			resources.ApplyResources(this.cmbGrayZoneColor, "cmbGrayZoneColor");
			this.cmbGrayZoneColor.BackgroundImage = null;
			this.cmbGrayZoneColor.Font = null;
			this.cmbGrayZoneColor.FormattingEnabled = true;
			this.cmbGrayZoneColor.Name = "cmbGrayZoneColor";
			this.cmbGrayZoneColor.SelectedIndexChanged += new System.EventHandler(cmbGrayZoneColor_SelectedIndexChanged);
			base.AccessibleDescription = null;
			base.AccessibleName = null;
			resources.ApplyResources(this, "$this");
			base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			this.BackgroundImage = null;
			base.Controls.Add(this.cmbGrayZoneColor);
			base.Controls.Add(this.cmbPositiveColor);
			base.Controls.Add(this.cmbNegativeColor);
			base.Controls.Add(this.txtNegativeConclusion);
			base.Controls.Add(this.lblNegativeConlusion);
			base.Controls.Add(this.txtPositiveConclusion);
			base.Controls.Add(this.lblPositiveConclusion);
			base.Controls.Add(this.txtGrayZoneConclusion);
			base.Controls.Add(this.lblGrayZoneConclusion);
			base.Controls.Add(this.panelButtons);
			this.Font = null;
			base.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
			base.Icon = null;
			base.MaximizeBox = false;
			base.MinimizeBox = false;
			base.Name = "FormGreyZoneConclusion";
			base.ShowIcon = false;
			base.ShowInTaskbar = false;
			base.Load += new System.EventHandler(FormGreyZoneConclusion_Load);
			this.panelButtons.ResumeLayout(false);
			base.ResumeLayout(false);
			base.PerformLayout();
		}
	}
}
